<script setup lang="ts">
import { computed, inject } from 'vue'
import ScoutParams from '@renderer/views/multiScanSeriesPage/components/paramsContainer/components/ScoutParams.vue'
import HelicalOrFaultParams
  from '@renderer/views/multiScanSeriesPage/components/paramsContainer/components/HelicalOrFaultParams.vue'
import { ChooseScanType } from '@renderer/views/multiScanSeriesPage/helper/types'
import { ElEmpty } from 'element-plus'

import { useScanStore } from '@renderer/store/pinia/scan'

const { scanSeriesArr, activeScanSeries } = inject('multiSeries') as any
const scanStore = useScanStore()
const currentSeries = computed(() => {
  return  scanStore.scanSeriesInfo.getSeriesById(activeScanSeries.id)
})



</script>

<template>
  <div>
    <span>参数选择</span>
    <el-scrollbar height="520px">
        <keep-alive>
          <template v-if="activeScanSeries.scanType === ChooseScanType.scout">
            <scout-params
              :series="currentSeries"
            />
          </template>
          <template v-else-if="[ChooseScanType.helical, ChooseScanType.fault].includes(activeScanSeries.scanType)">
            <helical-or-fault-params
              :series="currentSeries"
            />
          </template>
          <template v-else>
            <el-empty/>
          </template>
        </keep-alive>
    </el-scrollbar>
  </div>
</template>

<style scoped>

</style>
